<!DOCTYPE HTML><html>
<head>
<? echo $h->meta($title, $kwd, $dpn); ?>
<? require_once("lib.php"); ?>
<script type="text/javascript" src="<?=$ecom?>/js/ppt.js"></script>
</head>

<body id="index">
<? include_once("header.php"); ?>
<div id="wrap">
	<div id="neck">
		<div id="cate" class="left">
			<div class="cate cate_index">
				<ul><?=$cate_index?></ul>
			</div>
		</div>
		<div id="banner" class="right">
			<div id="banners">
<div id="maina">
<? // 幻灯片 banners
$count=1;$txta='';$txtb='<div id="featured_bottom"><div class="preview_images">';
foreach($arr_banner as $row)
{
	//$text.='<a href="'.$row['link'].'" target="_blank">'.$row['name'].'</a>';
	if($count==1){$txta.='<div class="featured_item current">';
	$txtb.='<a href="'.$row['link'].'" onfocus="this.blur()" class="current_prev">'.$count.'</a>';}
	else {$txta.='<div class="featured_item">';
	$txtb.='<a href="'.$row['link'].'" onfocus="this.blur()">'.$count.'</a>';
	}
	$txta.='<a href="'.$row['link'].'" target="_blank"><img src="upload/'.$row['pic'].'" /></a></div>';
	$count++;
}
$txta.='';$txtb.='</div><!--preview_images--></div><!--featured_bottom-->';
?>
<div id="featureds">
<? echo $txta; ?>
<? echo $txtb; ?>
</div><!--featured-->
</div><!--maina--></div><!--banners--><div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div><!--# neck-->
	<div id="featured_and_ad_right">
	<div class="h2index"><h2 class="left"><a><?=WEB_FEATURED_PRODUCTS?></a></h2><div class="clear"></div></div>
		<div id="featured" class="left">
			<div class="featured">
				<ul class="plist_fs">
					<?
						$str='';
						foreach ($arr_featured as $key => $val) {
							$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
							$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
							$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH*2,$lang);
							//$tem_price=round($val['price']*$currency_rate,2);
							$tem_price=price($val).discount($val);
							$str.='<li class="plist_f_li">
						<div class="plist_f">
							<div class="plist_pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'" width="'.PRODUCT_SMALL_PIC_WIDTH.'" height="'.PRODUCT_SMALL_PIC_HEIGHT.'" /></a></div>
								<div class="pname"><a href="'.$tem_link.'">'.$tem_name.'</a></div>
								<div class="price"><span><span>'.$currency_sign.'</span>'.$tem_price.'</span><div class="right"><a class="button_red" href="'.$tem_link.'">'.WEB_BUY_NOW.'</a></div></div>
							</div>
						</div>
					</li>';
						}
						echo $str;
					?>
				</ul>
				<div class="clear"></div>
			</div>
		</div><!--# featured product-->
		<div id="ad_right" class="right">
			<div id="newsbox"><div class="newsbox">
				<ul class="tab_news"><li class="h" link="box_notice"><a href="news-1.html"><?=WEB_BULLETIN_BOARD?></a></li><li link="box_news"><a href="news-2.html"><?=WEB_NEWS?></a></li></ul>
				<div class="clear"></div>
				<div class="news_box">
					<ul class="box_notice">
					<?
						$str='';
						foreach($arr_notice as $val) $str.='<li><a href="new-'.$val['id'].'.html">'.str_cut($val['name'],14).'</a></li>';
						echo $str;
					?>
					</ul>
					<ul class="box_news hide">
					<?
						$str='';
						foreach($arr_news as $val) $str.='<li><a href="new-'.$val['id'].'.html">'.str_cut($val['name'],14).'</a></li>';
						echo $str;
					?>
				</ul>
				</div>
			</div></div>
			<div class="ad_right">
				<a href="<?=$ad_right['link']?>"><img src="upload/<?=$ad_right['pic']?>" alt="<?=$ad_right['name']?>" width="220" height="260" /></a>
			</div>
		</div><!--# ad_right-->
		<div class="clear"></div>
	</div><!--# featured_and_ad_right-->
	<div class="px20"></div>
	<div id="hot">
		<div class="h2index"><h2 class="left"><a><?=WEB_HOT_ITEMS?></a></h2><div class="more right gray"><a href="best_seller.html"><?=WEB_VIEW_MORE?>>></a></div><div class="clear"></div></div>
		<div class="hot">
			<ul class="hlist_fs">
				<?
						$str='';
						foreach ($arr_hot as $key => $val) {
							//$tem_link='product-'.$val['id'].'.html';
							$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
							$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
							$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH,$lang);
							$tem_price=price($val).discount($val);
							$str.='<li class="hlist_li">
						<div class="hlist_f">
							<div class="hlist_pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'" width="'.PRODUCT_SMALL_PIC_WIDTH.'" height="'.PRODUCT_SMALL_PIC_HEIGHT.'" /></a></div>
								<div class="pname"><a href="'.$tem_link.'">'.$tem_name.'</a></div>
								<div class="price"><span><span>'.$currency_sign.'</span>'.$tem_price.'</span></div>
							</div>
						</div>
					</li>';
						}
						echo $str;
					?>
			</ul>
			<div class="clear"></div>
		</div>
	</div><!--# hot-->
	<div class="px20"></div>
	<div class="adbar"><a href="<?=$ad_bar['link']?>"><img src="upload/<?=$ad_bar['pic']?>" alt="<?=$ad_bar['name']?>" width="960" /></a></div>
	<div class="px20"></div>
	<div id="new">
		<div class="h2index"><h2 class="left"><a href="new_products.html"><?=WEB_NEW_ARRIVAL?></a></h2><div class="more right gray"><a href="new_products.html"><?=WEB_VIEW_MORE?>>></a></div><div class="clear"></div></div>
		<div class="new">
			<ul class="hlist_fs">
				<?
						$str='';
						foreach ($arr_new as $key => $val) {
							//$tem_link='product-'.$val['id'].'.html';
							$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
							$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
							$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH,$lang);
							$tem_price=price($val).discount($val);
							$str.='<li class="hlist_li">
						<div class="hlist_f">
							<div class="hlist_pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'" width="'.PRODUCT_SMALL_PIC_WIDTH.'" height="'.PRODUCT_SMALL_PIC_HEIGHT.'" /></a></div>
								<div class="pname"><a href="'.$tem_link.'">'.$tem_name.'</a></div>
								<div class="price"><span><span>'.$currency_sign.'</span>'.$tem_price.'</span></div>
							</div>
						</div>
					</li>';
						}
						echo $str;
					?>
			</ul>
			<div class="clear"></div>
		</div>
	</div><!--# new-->
</div>
<? include("footer.php"); ?>
</body>
</html>